﻿<Window x:Class="WpfVkontacteClient.AdditionalWindow.NotificationWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         Title="Notification Popup" Width="390" SizeToContent="Height"  WindowStyle="None" 
		AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False" Topmost="True">
	<Grid RenderTransformOrigin="0,1" DataContext="{Binding}" x:Name="LayoutRoot">
		<!-- Notification area -->
		<Border BorderThickness="1"  BorderBrush="Black" CornerRadius="10">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFB9BBFF" Offset="0" />
					<GradientStop Color="White" Offset="1" />
					<GradientStop Color="White" Offset="0.72" />
				</LinearGradientBrush>
			</Border.Background>
			<StackPanel Margin="15">
				<TextBlock TextWrapping="Wrap" Margin="5" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Grid}, Path=DataContext}"/>
			</StackPanel>
		</Border>
		<!-- Animation -->
		<Grid.Triggers>
			<EventTrigger RoutedEvent="FrameworkElement.Loaded">
				<BeginStoryboard>
					<Storyboard x:Name="storyNotify">
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
							<SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
							<SplineDoubleKeyFrame KeyTime="0:0:0.9" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
							<SplineDoubleKeyFrame KeyTime="0:0:5" Value="1"/>
							<SplineDoubleKeyFrame KeyTime="0:0:7" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</BeginStoryboard>
			</EventTrigger>
		</Grid.Triggers>
		<Grid.RenderTransform>
			<ScaleTransform ScaleY="1" />
		</Grid.RenderTransform>
	</Grid>
</Window>
